<template>
  <ul>
    <li v-for="item in goodsList" :key="item.id">
      <img :src="item.list_pic_url" alt="" />
      <div class="content">
        <div class="title">{{ item.name }}</div>
        <div class="price">{{ item.retail_price | RMBFormat }}</div>
      </div>
    </li>
  </ul>
</template>

<script>
export default {
  props: ["goodsList"],
  data() {
    return {};
  },
};
</script>
 
<style lang = "less" scoped>
ul {
  background-color: #fff;
  width: 100%;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  li {
    width: 49%;
    margin-bottom: 10px;
    img {
      width: 100%;
    }
    .content {
      text-align: center;
      font-size: 14px;
      .title {
        width: 100%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
      }
      .price {
        line-height: 40px;
        color: #8b0000;
      }
    }
  }
}
</style>